home *** CD-ROM | disk | FTP | other *** search
/ Macromedia Multimedia Showcase 6.0 / Macromedia Multimedia Showcase v6.0 WIN-MAC (XMSH60CD)(Macromedia, Inc.)(1996).iso / pc / demosoft / xres / data.z / STATUSD.PS < prev    next >
Text File  |  1996-03-29  |  5KB  |  222 lines

  1.  
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. %%                                                                  %%
  4. %% statusdict.ps:  this file defines all the things that we want to %%
  5. %% emulate in statusdict.  Strictly speaking, a lot of these        %%
  6. %% procedures are only defined if you are driving a device to which %%
  7. %% they are relevant; however, since TPro lets you switch between   %%
  8. %% arbitrary output devices with arbitrary capabilities, this is    %%
  9. %% probably not what you want.  Also, we don't do things like set   %%
  10. %% PageSize policiy to 0 for the paper tray compatibility operators.%%
  11. %%                                                                  %%
  12. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  13.  
  14. statusdict begin
  15.  
  16. /waittimeout 0 def
  17. /manualfeedtimeout 0 def
  18. /jobtimeout 0 def
  19.  
  20. /revision revision def
  21.  
  22. /product product def
  23.  
  24. /jobname () def
  25.  
  26. /setjobtimeout {pop} def
  27.  
  28. /printername {
  29.   currentsystemparams /PrinterName get exch copy
  30. } binddef
  31.  
  32. /setprintername {
  33.   << /Password () /PrinterName 5 -1 roll >> setsystemparams
  34. } binddef
  35.  
  36. /realformat {
  37.   currentsystemparams /RealFormat get
  38. } binddef
  39.  
  40. /byteorder {
  41.   currentsystemparams /ByteOrder get
  42. } binddef
  43.  
  44. /buildtime {
  45.   currentsystemparams /BuildTime get
  46. } binddef
  47.  
  48. /checkpassword {
  49.   systemdict /checkpassword get exec
  50. } binddef
  51.  
  52. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  53. %%                                    %%
  54. %% Page device compatibility operators                    %%
  55. %%                                    %%
  56. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  57.  
  58. /processcolors {
  59.   currentpagedevice /ProcessColorModel get
  60.   dup /DeviceGray eq {1} {
  61.     dup /DeviceRGB eq {3} {4} ifelse
  62.   } ifelse exch pop
  63. } binddef
  64.  
  65. /pagecount {
  66.   currentpagedevice
  67.   dup /HWPageCount known {
  68.     /HWPageCount get
  69.   } {
  70.     pop 0
  71.   } ifelse
  72. } binddef
  73.  
  74. /setpageparams {    %% width height offset orientation => -
  75.   <<
  76.     /PageSize 6 -2 roll
  77.       4 index 0 eq {exch} if
  78.       2 array astore
  79.     /Margins [ 7 -1 roll 0 ]
  80.     /Orientation 7 -1 roll 0 eq {3} {0} ifelse
  81.   >> setpagedevice
  82. } binddef
  83.  
  84. /pageparams {
  85.   currentpagedevice begin
  86.     PageSize aload pop
  87.     currentdict /Margins known {Margins 0 get} {0} ifelse
  88.     currentdict /Orientation known {
  89.       Orientation 0 eq {1} {0} ifelse
  90.     } {
  91.       1
  92.     } ifelse
  93.   end
  94. } binddef
  95.  
  96. /setpage {
  97.   statusdict begin 0 exch setpageparams end
  98. } binddef
  99.  
  100. /setmargins {
  101.   currentpagedevice
  102.   dup /Margins known {
  103.     /Margins get aload pop
  104.     4 -1 roll sub
  105.     3 1 roll add
  106.     exch 2 array astore
  107.     << exch /Margins exch >> setpagedevice
  108.   } {
  109.     pop pop
  110.   } ifelse
  111. } binddef
  112.  
  113. /setresolution {
  114.   << /HWResolution [ 4 -1 roll dup ] >> setpagedevice
  115. } binddef
  116.  
  117. /resolution {
  118.   currentpagedevice /HWResolution get 0 get
  119. } binddef
  120.  
  121. /setmirrorprint {
  122.   << exch /MirrorPrint exch >> setpagedevice
  123. } binddef
  124.  
  125. /mirrorprint {
  126.   currentpagedevice /MirrorPrint get
  127. } binddef
  128.  
  129. /setpagestackorder {
  130.   << exch /OutputFaceUp exch not >> setpagedevice
  131. } binddef
  132.  
  133. /pagestackorder {
  134.   currentpagedevice /OutputFaceUp get not
  135. } binddef
  136.  
  137. /setaccuratescreens {
  138.   << exch /AccurateScreens exch >> setuserparams
  139. } binddef
  140.  
  141. /accuratescreens {
  142.   currentuserparams /AccurateScreens get
  143. } binddef
  144.  
  145. /checkscreen {
  146.   systemdict /checkscreen get exec
  147. } binddef
  148.  
  149. /setpagemargin {
  150.   [ exch 0 ]
  151.   << exch /PageOffset exch >> setpagedevice
  152. } binddef
  153.  
  154. /pagemargin {
  155.   currentpagedevice /PageOffset get 0 get
  156. } binddef
  157.  
  158. /duplexmode {
  159.   currentpagedevice /Duplex known {
  160.     currentpagedevice /Duplex get
  161.   } {
  162.     false
  163.   } ifelse
  164. } binddef
  165.  
  166. /firstside {
  167.   currentpagedevice /Duplex known {
  168.     currentpagedevice /FirstSide get
  169.   } {
  170.     true
  171.   } ifelse
  172. } binddef
  173.  
  174. /newsheet {
  175.   duplex firstside not and {showpage} if
  176. } binddef
  177.  
  178. /setduplexmode {
  179.   dup currentpagedevice /Duplex known or {
  180.     << exch /Duplex exch >> setpagedevice
  181.   } {
  182.     pop
  183.   } ifelse
  184. } binddef
  185.  
  186. /settumble {
  187.   dup currentpagedevice /Tumble known or {
  188.     << exch /Tumble exch >> setpagedevice
  189.   } {
  190.     pop
  191.   } ifelse
  192. } binddef
  193.  
  194. /tumble {
  195.   currentpagedevice /Tumble known {
  196.     currentpagedevice /Tumble get
  197.   } {
  198.     false
  199.   } ifelse
  200. } binddef
  201.  
  202. /manualfeed {
  203.   << exch /ManualFeed exch >> setpagedevice
  204. } binddef
  205.  
  206. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  207. %%                                    %%
  208. %% Paper tray compatibility operators.                    %%
  209. %%                                    %%
  210. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  211.  
  212. /lettertray {<</PageSize [612 792] /ImagingBBox null>> setpagedevice} binddef
  213. /legaltray {<</PageSize [612 1008] /ImagingBBox null>> setpagedevice} binddef
  214. /ledgertray {<</PageSize [1224 792] /ImagingBBox null>> setpagedevice} binddef
  215. /11x17tray {<</PageSize [792 1224] /ImagingBBox null>> setpagedevice} binddef
  216. /a3tray {<</PageSize [842 1191] /ImagingBBox null>> setpagedevice} binddef
  217. /a4tray {<</PageSize [595 842] /ImagingBBox null>> setpagedevice} binddef
  218. /b5tray {<</PageSize [499 709] /ImagingBBox null>> setpagedevice} binddef
  219.  
  220.  
  221. end
  222.